% -*- mode: latex; fill-column: 120; -*-

With the provisioning services enabled, the next step is to define
\nottoggle{isxCATstateful}{and customize} 
a system image that can subsequently be
used to provision one or more {\em compute} nodes. The following subsections highlight this process.

\subsubsection{Build initial BOS image} \label{sec:assemble_bos}
The following steps illustrate the process to build a minimal, default image for use with \xCAT{}. To begin, you will
first need to have a local copy of the ISO image available for the underlying OS. In this recipe, the relevant ISO image
is \texttt{CentOS-7-x86\_64-DVD-1810.iso} (available from the CentOS mirrors). We initialize the image
creation process using the \texttt{copycds} command assuming that the necessary ISO image is available locally in 
\texttt{\$\{iso\_path\}} as follows:

% begin_ohpc_run
% ohpc_comment_header Initialize OS images for use with xCAT \ref{sec:assemble_bos}
\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true,keepspaces,literate={BOSVER}{\baseos{}}1]
[sms](*\#*) copycds ${iso_path}/CentOS-7-x86_64-DVD-1810.iso
\end{lstlisting}
% end_ohpc_run

\noindent Once completed, several OS images should be available for use within \xCAT{}. These can be queried via:

\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true,keepspaces,literate={BOSVER}{\baseos{}}1]
# Query available images
[sms](*\#*) lsdef -t osimage
centos7.6-x86_64-install-compute  (osimage)
centos7.6-x86_64-netboot-compute  (osimage)
centos7.6-x86_64-statelite-compute  (osimage)
\end{lstlisting}

In this example, we leverage
\iftoggleverb{isxCATstateful}
the stateful ({\em install}) image for provisioning of {\em
compute} nodes.  The other images, {\em
netboot-compute} and {\em statelite-compute}, are for stateless and statelite
installations, respectively. \OHPC{} provides a stateless \xCAT{} recipe,
follow that guide if you are interested in a stateless install.
\else
the stateless ({\em netboot}) image for compute nodes and proceed by using
\texttt{genimage} to initialize a chroot-based install. Note that the previous query highlights the existence of other
provisioning images as well. \OHPC{} provides a stateful \xCAT{} recipe, 
follow that guide if you are interested in  stateful install.
%The \texttt{CHROOT} environment variable highlights the path and is used by
%subsequent commands to augment the basic installation.
\fi
Statelite installation is an intermediate type of install, in which a limited
number of files and directories persist across reboots.  Please consult
available xCAT \href{https://xcat-docs.readthedocs.io/en/stable/}{\color{blue}
documentation} if interested in this type of install.
